package forms;

import org.apache.struts.action.*;

import java.util.*;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

public class DegreeForm extends ActionForm {

	private static final long serialVersionUID = 1L;
	
	// Variables that make a degree
	private String location = null;
	
	private String university = null;
	
	private String discipline = null;
	private String month = null;
	private String year = null;
	private String gpa = null;
	private String title = null;
	
	private Vector degrees = new Vector();

	// Setters and Getters
	public String getLocation() {
		return location;
	}
	public void setLocation(String place) {
		this.location = place;
	}
	public String getUniversity() {
		return university;
	}
	public void setUniversity(String school) {
		this.university = school;
	}
	public String getDiscipline() {
		return discipline;
	}
	public void setDiscipline(String major) {
		this.discipline = major;
	}
	public String getMonth() {
		return month;
	}
	public void setMonth(String m) {
		this.month = m;
	}
	public String getYear() {
		return year;
	}
	public void setYear(String y) {
		this.year = y;
	}
	public String getGpa() {
		return gpa;
	}
	public void setGpa(String g) {
		this.gpa = g;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String t) {
		this.title = t;
	}

	// Adding multiple degrees to the list
	public void addDegree(HashMap d) {
		this.degrees.add(d);
	}
	public Vector getDegrees() {
		return degrees;
	}
	public void eraseDegrees() {
		degrees.clear();
	}
	
	/*
	public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
		ActionErrors errors = new ActionErrors();

		// Check if gpa is valid

		return errors;
	}
	*/
}
